Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[DRAFT] Early multi-solution system #631

Closed
wants to merge 0 commits into from
Closed

[DRAFT] Early multi-solution system #631

wants to merge 0 commits into from

Conversation

msooseth
Copy link
Collaborator

@msooseth msooseth commented Jan 9, 2025

Description

Making progress towards symbolic jumpdestinations via SMT solving. This PR allows us to branch out to all potential jumpdests.

The system can restrict the returned value's number of relevant bytes to a fixed value. So if we are looking for a JUMP, it ignores high bytes, because it's impossible to have a PC that's more than 2^16 (more than 65K instructions). Similarly for addresses. This matters, because it can happen that there's some junk that's not restricted and we could get thousands of solutions, but they are actually all the same address if we ignore the bits other than the 160b that an address has.

Currently, it launches a new query for each new solution, which is very slow. This needs to be improved in a new PR. That will require a slight re-engineering of Solvers.hs, so we can query the system for more than one solution at a time.

Number of potential concrete is set to 10 by default. This is actually kinda low. However, we need to be a bit cautious, as things can blow up quickly, so I set 10. It can be changed via --max-branch K.

Checklist

  • tested locally
  • added automated tests
  • updated the docs
  • updated the changelog

@msooseth msooseth force-pushed the multi-solutions branch 6 times, most recently from 6d4702b to 59991d7 Compare January 27, 2025 11:46
@msooseth msooseth force-pushed the multi-solutions branch 3 times, most recently from 9962b40 to 8b0710d Compare January 29, 2025 11:52
@msooseth
Copy link
Collaborator Author

I don't know how of a good test case unfortunately....

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant